import java.lang.reflect.Array;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description: 数组的扩容(Arrays进行扩容)
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-04-19  20:37
 */
public class Test2 {
    public static void main(String[] args) {
        int[] arrays = {1,2,3,4,5};
        int[] array1 = Arrays.copyOf(arrays,arrays.length*2);
        System.out.println(Arrays.toString(array1));
    }
}
